<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>

<head>
	 <jsp:include page="head.jsp"></jsp:include>
</head>
<body style="margin:0;padding:0;height:100%;overflow:hidden;background:#F2FBFF">
	<form id="flowform" method="post">
		<input type="hidden" id="flowId" name="id" value=""/>
	</form>
	<div class="easyui-layout" fit="true">
		<div region="north" border="false">
			<div class="toolbar">
				<a href="#" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="newItem()">新增流程</a>
				<a href="#" class="easyui-linkbutton" iconCls="icon-edit" plain="true" onclick="editItem()">修改流程</a>
				<a href="#" class="easyui-linkbutton" iconCls="icon-cancel" plain="true" onclick="delItem()">删除流程</a>				
			</div>
		</div>
		
		<div region="center" border="false">
			<table id="t-flow" class="easyui-datagrid"
					url="<c:url value='/permissions/getItemsFlowDefine.tg'/>"
					singleSelect="true" pagination="true"
					border="false" fit="true">
				<thead>
					<tr>
						<th field="name" width="100" sortable="true">流程名称</th>
						<th field="remind" width="100" formatter="remindFormatter">流程提醒方式</th>
						<th field="createUserName" width="50">创建人</th>
						<th field="createDate" width="100" sortable="true">创建日期</th>
						<th field="companyName" width="100">适用公司</th>
						<th field="flowScope" width="150">流程说明</th>
					</tr>
				</thead>
			</table>
		</div>
	</div>
	
	<div id="dlg" style="width:530px;height:400px;"
			class="easyui-dialog" closed="true" modal="true" buttons="#dlg-buttons">
		<div style="padding-left:50px;padding-top:20px;">
			<div style="float:center">
				<form id="myform" method="post" style="margin:0;padding:0">
					<table>
						<tr>
							<td style="width:80px">流程名称</td>
							<td><input type="text" id="name" class="easyui-validatebox e-input" name="flowDefine.name" required="true"></input>*XX公司XX流程</td>
						</tr>
						
						<tr>
							<td>通知方式</td>
							<td>
								<input id="remind" class="easyui-combobox"  name="flowDefine.remind" style="width:200px" 
									required="true" readonly="true" panelHeight="auto"
									url="<c:url value='/permissions/outDicJsonByNicknameActions.tg?nickName=remind'/>"
									valueField="value" textField="name">*任务通知方式
							</td>
						</tr>
						<tr>
							<td>适用公司</td>
							<td>
								<input id="companyId" name="flowDefine.companyId" class="easyui-combotree" style="width:200px" 
								url="<c:url value='/permissions/getTreeCompany.tg'/>"
								valueField="id" textField="text" multiple="true" cascadeCheck="false">*不选为全部适用
								
							</td>
						</tr>
						<tr>
							<td style="width:80px">流程说明</td>
							<td><input type="text" id="flowScope" class="easyui-validatebox e-input" name="flowDefine.flowScope" style="height:40px;width:200px"></input>*使用场景说明</td>
						</tr>
						<tr>
							<td>&nbsp;</td>
							<td>
								<input type="hidden" id="id" name="flowDefine.id" value="1">
								<input type="hidden" id="flowType" name="flowDefine.flowType" value="F0A">
							</td>
						</tr>

						<tr>						
						<td colspan="2" align="center">
						<hr/>
						</td>
						</tr>
									<tr>
										<td style="width:80px">节点名称：
										</td>
										<td>
										<input type="text" id="description888" class="easyui-validatebox e-input" name="description"></input>*部门名称或审批说明
										<input type="hidden" id="id888" name="detailId" value=""/>
										</td>							
									</tr>
									<tr>
										
										<td style="width:80px">是否会签:
										</td>
										<td>							
										<input id="allAuth888" class="easyui-combobox"  name="allAuth" style="width:200px" 
												readonly="true" 
												url="<c:url value='/permissions/outDicJsonByNicknameActions.tg?nickName=yesorno'/>"
												valueField="value" textField="name">*是否同级所有人都通过
										</td>
										
									</tr>
									<tr>
										<td style="width:80px">处 理 人:
										</td>
										<td>							
										<input id="dealUsers888" name="dealUsers" class="easyui-combotree" style="width:285px" 
											url="<c:url value='/permissions/getOrgTreeUser.tg'/>"
											valueField="id" textField="text" multiple="true" cascadeCheck="false">
										</td>
									</tr>
						<tr>
							<td colspan="2" align="center">
								<a href="#" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="newDetailItem()">新增流程节点</a>
								<a href="#" class="easyui-linkbutton" iconCls="icon-edit" plain="true" onclick="editDetailItem()">修改流程节点</a>
								<a href="#" class="easyui-linkbutton" iconCls="icon-cancel" plain="true" onclick="delDetailItem()">删除流程节点</a>	
							</td>							
						</tr>									
						<tr>						
						<td colspan="2" align="center">
						<hr/>
						</td>
						</tr>
						<tr>						
							<td colspan="2" align="center">
							流程节点列表
							</td>
						</tr>
						<tr>						
							<td colspan="2" align="center">
							<hr/>
							</td>
						</tr>
					</table>
					<table id="stepTable" width="100%">						
						<tr id="row_base0">						
							<td>
							选择
							</td>
							<td>
							节点名称
							</td>
							<td>
							是否会签
							</td>
							<td>
							审批人列表
							</td>
						</tr>

					</table>
				</form>
			</div>
			<div style="clear:both"></div>
		</div>
		<div id="dlg-buttons" style="text-align:center;">
			<a href="#" class="easyui-linkbutton" iconCls="icon-save" onclick="saveItem()">保存</a>
			<a href="#" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#dlg').dialog('close')">关闭</a>
		</div>
	</div>
	
</body>
